<template>
	<!-- 商铺管理 -->
	<view class="s_wp">
		<view class="list" v-if="list.length>0">
			<view class="item" v-for="(item,index) in list" :key="item.uid">
				<view class="top">
					<image :src="item.logo"></image>
					<view class="info">
						<view class="tit clamp">{{item.supname}}</view>
						<view class="type">门店类型：{{item.paymode}}</view>
						<view class="name">负责人：{{item.principalname}}</view>
					</view>
				</view>
			</view>
		</view>
		<view class="empty_loading">
			<image v-show="isloading" src="/static/business/loading.gif" mode=""></image>
			<text v-show="!ismore">到底了~</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],
				isloading: false,
				ismore: false,
				page: 0,
				id: 0
			}
		},
		onBackPress(e) {
			if (e.from == "backbutton") {
				this.$navBack(2);
				return true;
			}
		},
		onLoad(option) {
			this.id = option.id;
			this.getlist();
		},
		onReachBottom(){
			this.getlist();
		},
		methods: {
			getlist() {
				this.page++;
				this.isloading = true;
				this.$axios('groupsupp/suplists', 'POST', 'member',{
					groupid: this.id
				}).then(res => {
					this.isloading = false;
					if (res.data.code == 200) {
						this.list = res.data.data.list;
						this.ismore = res.data.data.list.length > 0;
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #FBF8FE;
	}

	.s_wp {
		overflow: hidden;
		padding: 20rpx;
		padding-bottom: 166rpx;
	}
	.list{
		.item{
			background: #FFFFFF;
			border-radius: 12rpx;
			padding: 20rpx;
			margin-bottom: 20rpx;
			.top{
				display: flex;
				justify-content: space-between;
				image{
					width: 144rpx;
					height: 144rpx;
					border-radius: 12rpx;
				}
				.info{
					width: calc(100% - 144rpx);
					padding-left: 20rpx;
					font-size: 24rpx;
					display: flex;
					flex-direction: column;
					justify-content: space-around;
					.tit{
						font-size: 28rpx;
						color: #333333;
						font-weight: 600;
					}
					.type{
						color: #3FA859;
					}
					.name{
						color: #999999;
					}
				}
			}
		}
	}
</style>
